package com.dmagic.cms.service;

import java.util.List;

import javax.persistence.RollbackException;

import org.springframework.web.multipart.commons.CommonsMultipartFile;

import com.dmagic.cms.common.exception.ServiceException;
import com.dmagic.cms.entity.Language;
import com.dmagic.cms.entity.UploadFileInfo;

public interface BaseService {
	public List<Language> getAllLanguages();

	public UploadFileInfo upload(CommonsMultipartFile file, Long uploadFileSetInfoId) throws ServiceException;

	public List<UploadFileInfo> getUploadFileInfoListByUploadFileSetInfoId(Long uploadFileSetInfoId);

	public List<UploadFileInfo> getUploadFileInfoListIncludeDeleteInfoByUploadFileInfoIds(
			Long[] uploadFileInfoIds);

	public void deleteUploadFileInfoByUploadFileInfoId(Long uploadFileInfoId) throws RollbackException;

	public void deleteUploadFileInfoByUploadFileSetInfoId(Long uploadFileSetInfoId) throws RollbackException;

	public boolean checkUploadFileSetInfoId(Long uploadFileSetInfoId);

	public boolean checkUploadFileInfoId(Long uploadFileInfoId);

	public boolean checkExistingUploadFile(Long uploadFileSetInfoId, String fileName);

	public UploadFileInfo getUploadFileInfo(Long uploadFileInfoId);

	public void setMainFileByFileInfoId(Long uploadFileInfoId);
}
